<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> 
<head>
<title>Title</title>
<link rel="stylesheet" type="text/css" href="../../../docs/rotor.css">
</head>

<body>		


<h1> Managed Resources Sample</h1>


<h2>Sample Overview</h2>


<p>This sample demonstrates the use of managed resources.&nbsp;It allows the 
user to experiment with various options in creating and using managed resources 
and resource assemblies.</p>


<p>The following table shows the command-line options used by the sample.</p>


<table border="1" width="90%">
    <tr>
    <th width="26%">Option<th width="74%">Description
    </tr>
  <tr valign="top">
    <td width="26%"><b>/?<br>
    -?<br>
    /h<br>
    -h</b></td>
    <td width="74%">Displays usage description.</td>
  </tr>
  <tr valign="top">
    <td width="26%"><b>/r<br>
    -r</b></td>
    <td width="74%">Uses the <b>ResourceManager</b> class to build .resource files and 
    then invokes the Assembly Linker to build satellite assemblies in the 
    correct location to be found and loaded by the application when the <b>/u</b> 
    option is used.</td>
  </tr>
  <tr valign="top">
    <td width="26%"><b>/t<br>
    -t</b></td>
    <td width="74%">Emits text resource files and usage instructions on how to 
    manually perform the steps required to generate .resources files using the 
    Resource Generator tool, and  satellite assemblies using the Assembly 
    Linker.</td>
  </tr>
  <tr valign="top">
    <td width="26%"><b>/u<br>
    -u</b></td>
    <td width="74%">Causes the application to use the resource file build 
    automatically with the <b>/r</b> option or manually after using the <b>/t</b> option.</td>
  </tr>
</table>

<p>Use <b>/r</b> first to build satellite assemblies and then use <b>/u</b> to see the results of 
using the various satellite assemblies.&nbsp;Or use <b>/t</b> to emit text files and 
then manually build .resources files and satellite assemblies.&nbsp; Use <b>/u</b> to 
see the results of using the various satellite assemblies. </p>



<h2>Sample Source and Build Output Locations</h2>


<p>The sample source is found in sscli20\samples\howto\resources.&nbsp; </p>


<p>The source file is:</p>


<ul class="none">
  <li><a href="managedresources.cs">managedresources.cs</a></li>
</ul>


<p>The build output location is %_NTTREE%\samples\howto\resources.&nbsp; 
The output file is an executable assembly named managedresources.exe.</p>


<h2>Building the Sample</h2>


<p>All samples are built from the buildall script.&nbsp;  </p>


<p>You can also build all the 
samples by switching to the root of the sample directory, sscli20\samples, and typing 
<code>build -c</code>.</p>


<p>You can build this specific sample  by switching to the sample directory and typing 
<code>build -c</code>.</p>


<h2>Running the Sample</h2>


<p>These steps require that the Shared Source CLI (SSCLI) be already built and 
functional.</p>


<ol>
  <li>Run env.bat. </li>
  <li>Switch to the %_NTTREE%\samples\howto\resources directory.</li>
  <li>Type the following command:<p>clix managedresources.exe <i>option</i></p>


  </li>
</ol>


<hr>


<p><i>Copyright (c) 2006 Microsoft Corporation. All rights reserved.</i></p>
</body> 
</html>